<template>
	<div class="zco-ocr-container">
		<BankCard
			v-if="businessType === 'bankcard'"
			:bankName="message && message.data && message.data.result && message.data.result.bankName ? message.data.result.bankName : ''"
			:cardNumber="message && message.data && message.data.result && message.data.result.cardNumber ? message.data.result.cardNumber : ''"
			:cardType="message && message.data && message.data.result && message.data.result.cardType ? message.data.result.cardType : ''"
			:validToDate="message && message.data && message.data.result && message.data.result.validToDate ? message.data.result.validToDate : ''"
			:status="message.data.status"
			:toUserName="message.toUserInfo.userName"
			:toUserRole="message.toUserInfo.role"
		/>
		<IdCard
			v-if="businessType === 'idcard'"
			:status="message.data.status"
			:toUserName="message.toUserInfo.userName"
			:toUserRole="message.toUserInfo.role"
			:Name="message && message.data && message.data.result && message.data.result.name ? message.data.result.name : ''"
			:address="message && message.data && message.data.result && message.data.result.address ? message.data.result.address : ''"
			:birthDate="message && message.data && message.data.result && message.data.result.birthDate ? message.data.result.birthDate : ''"
			:ethnicity="message && message.data && message.data.result && message.data.result.ethnicity ? message.data.result.ethnicity : ''"
			:idNumber="message && message.data && message.data.result && message.data.result.idNumber ? message.data.result.idNumber : ''"
			:issueAuthority="message && message.data && message.data.result && message.data.result.issueAuthority ? message.data.result.issueAuthority : ''"
			:sex="message && message.data && message.data.result && message.data.result.sex ? message.data.result.sex : ''"
			:validPeriod="message && message.data && message.data.result && message.data.result.validPeriod ? message.data.result.validPeriod : ''"
			:side="message && message.data && message.data.side ? message.data.side : ''"
		/>
	</div>
</template>
<script>
import BankCard from './BankCard/index.vue';
import IdCard from './IdCard/index.vue';
export default {
	name: 'APP',
	components: { BankCard, IdCard },
	props: {
		businessType: {
			type: String,
			default: () => ''
		},
		message: {}
	},
	data() {
		return {};
	},
	methods: {},
	created() {},
	mounted() {}
};
</script>
<style scoped></style>
